    
    function setQuestionMoudle(node) {
        $("#input-id").val($(node).parent().parent("tr").find("td").eq(0).html())

        $("#moudle-name").val($(node).parent().parent("tr").find("td").eq(1).html())

        $("#select-moudle").html("");

        $("#indexUpdateBtn").attr("disabled","disabled");
        $.ajax({
            url:"getAllMoudle.action",
            type: "post",
            async: "false",
            dataType: "json",
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
            data: {
            },
            success:function (data) {
                $("#select-moudle").append("<option value='0'>请选择</option>")
                    for (var i=0;i<data.allmoudle.length;i++){

                        $("#select-moudle").append("<option value='"+ data.allmoudle[i].id+"'>"+data.allmoudle[i].moudlename+"</option>");
                    }

                },
            error:function () {
                alert("请求失败")
            }
        })

    }


    function addOrUpdateMoudle() {
        var id= $("#input-id").val();

    }

    function checkNotZero() {
        if ($("#select-moudle").val()!=0){
            $("#indexUpdateBtn").removeAttrs("disabled");
        }

    }

    function updateGoodsMoudle() {
            var id= $("#input-id").val();
            var moudleid=$("#select-moudle").val();

        $.ajax({
            url:"updateGoodsMoudle.action",
            type: "post",
            async: "false",
            dataType: "json",
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
            data: {
                "id":id,
                "moudleid":moudleid
            },
            success:function (data) {
               alert(data.msg)
                getGoodsInfo()
            },
            error:function () {
                alert("请求失败")
            }
        })

    }